package com.iwhalecloud.bss.kite.cucc.service.attr.handler;

import com.iwhalecloud.bss.kite.common.constant.KeyConsts;
import com.iwhalecloud.bss.kite.common.constant.ServiceOfferConsts;
import com.iwhalecloud.bss.kite.common.util.KiteStringUtils;
import com.iwhalecloud.bss.kite.manager.inst.KiteAttr;
import com.iwhalecloud.bss.kite.manager.inst.KiteInst;
import com.iwhalecloud.bss.kite.service.attr.data.CustAttrData;
import com.iwhalecloud.bss.kite.service.attr.handler.AbstractAttrHandler;
import org.springframework.stereotype.Service;
@Service
public class SafeAttrChangeNotEditHandler extends AbstractAttrHandler<KiteInst, CustAttrData> {
    @Override
    public void after(KiteAttr attr, KiteInst inst, CustAttrData data) {
        super.after(attr, inst, data);
        //行业属性变更时置灰
        if(KiteStringUtils.equals(ServiceOfferConsts.SERVICE_OFFER_MODIFY,data.getServiceOfferId())){
            attr.setIsEdit(KeyConsts.IFTRUE_F);
        }
    }
}
